#ifndef ZIGBEECONFIGPROTOCOL_H
#define ZIGBEECONFIGPROTOCOL_H

#include <QObject>
#include "Protocol/BaseProtocol.h"
#include "DataType/DataType.h"

class ZigbeeConfigProtocol : public BaseProtocol
{
    Q_OBJECT
public:
    explicit ZigbeeConfigProtocol(QObject *parent = 0);
    QList<Package> parseData(QByteArray data);
    QByteArray generateData(Package package);

    enum FunctionCode
    {
        SetZigbeeParam = 0x07,
        GetZigbeeParam = 0x22,
        ReStartZigbee  = 0x11,
        CreateNewZigbee=0xa1,
        AllowNewJoin   =0xa2,
        BanNewJoin     =0xa3,
        ResNewZigbee =0xa4,
        QueryNewZigbeeParam=0xa5,
        QueryZigbeeVersion=0xa6,
        NewJoinParam    =0x30

    };


private:
    enum CheckSteps
    {
        CHECK_HEAD,
        CHECK_FUNCTION,
        CHECK_BODY,
        CHECK_END
    };

};

#endif // ZIGBEECONFIGPROTOCOL_H
